<?php

// +----------------------------------------------------------------------
// | 订单任务列表数据表
// +----------------------------------------------------------------------

namespace common\model;

use think\model\RelationModel;

class OrderTaskListModel extends RelationModel
{
    const STATUS_DEFAULT = 'default';   //正常
    const STATUS_WITHDRAW = 'withdraw'; //撤回
    const STATUS_INVALID = 'invalid';   //失效

    //自动验证
    protected $_validate = [
        ['order_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
        ['task_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
        ['status', ['default', 'withdraw', 'invalid'], '', self::EXISTS_VALIDATE, 'in'], // 订单任务列表状态

    ];

    //自动完成
    protected $_auto = [

    ];
}
